import request from '@/utils/request'

// 文件备份还原新增
export function filebackupAdd(data) {
  return request({
    url: '/cqbc/filebackup',
    method: 'POST',
    data: data
  })
}

//获取当前服务器位置
export function getRoute(query) {
  return request({
    url: '/cqbc/filebackup/getRoute',
    method: 'GET',
    params: query
  })
}
//获取文件大小
export function getFileSize(query) {
  return request({
    url: '/cqbc/filebackup/getFileSize',
    method: 'GET',
    params: query
  })
}

//返回时windows还是linux
export function checkSystem(query) {
  return request({
    url: '/cqbc/filebackup/checkSystem',
    method: 'GET',
    params: query
  })
}

//文件备份还原列表
export function filebackupList(query) {
  return request({
    url: '/cqbc/filebackup/list',
    method: 'GET',
    params: query
  })
}

//获取详情
export function filebackupInfo(id) {
  return request({
    url: '/cqbc/filebackup/'+id,
    method: 'GET'
  })
}

//文件备份还原删除
export function filebackupdelete(id) {
  return request({
    url: '/cqbc/filebackup/'+id,
    method: 'DElETE'
  })
}

//修改
export function filebackupDeit(data) {
  return request({
    url: '/cqbc/filebackup/',
    method: 'PUT',
    data:data
  })
}

//修改启动状态

export function updateState(data) {
  return request({
    url: '/cqbc/filebackup/updateState',
    method: 'PUT',
    data:data
  })
}

//文件备份
export function backup(query) {
  return request({
    url: '/cqbc/filebackup/backup',
    method: 'GET',
    params:query
  })
}